--[[
	@module 文件处理工具类
]]

--[[
	返回文件的大小单位：字节
	@filename 文件绝对路径
]]
local function length_of_file(filename)
	local fh = assert(io.open(filename, "rb"))
	local len = assert(fh:seek("end"))
	fh:close()
	return len
end

--[[
	写文本文件
	@filename 文件绝对路径
	@content 文件内容
]]
local function write_content(filename, content)
	local f = assert(io.open(filename, 'w+'))
	f:write(content)
	f:close()
end

local _M = {  
   length_of_file = length_of_file,
   write_content = write_content  
}  
  
return _M